import { useUserInfoStore } from '@/stores/userInfo'
import type {App} from 'vue'




export default (app:App)=>{
    const userInfostore = useUserInfoStore()
    // app.directive('color', (el, binding) => {
    //     // 这会在 `mounted` 和 `updated` 时都调用
    //     el.style.color = binding.value
    // })
    app.directive('has',{
        mounted(ele,bindings){
            let isExs = userInfostore.userInfo.buttons.includes(bindings.value)
            if(!isExs){
                ele.parentNode.removeChild(ele)
            }
        }
    })
}